package Java实验.实验四;
import java.util.Scanner;

public class Demo1 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        double radius = scanner.nextDouble();
        double length = scanner.nextDouble();
        double width = scanner.nextDouble();
        Circle circle = new Circle(radius);
        Rectangle rectangle = new Rectangle(length, width);
        System.out.println(circle.getAcreage());
        System.out.print(rectangle.getAcreage());
    }
}

/********** Begin *********/
abstract class Shape {
    abstract double getAcreage();
}
class Circle extends Shape {
    private double radius;
    public Circle(){}
    public Circle(double radius){
        this.radius=radius;
    }
    double getAcreage(){
        return 3.1415926*radius*radius;
    }
}

class Rectangle extends Shape {
    private double length;
    private double width;
    public Rectangle(){}
    public Rectangle(double length,double width){
        this.length=length;
        this.width=width;
    }
    double getAcreage(){
        return length*width;
    }
}
/********** End *********/
